package com.sumainfor.pc.gmio.controller.director;

import com.sumainfor.common.util.JsonResult;
import com.sumainfor.pc.gmio.service.DiComplaintTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 *投诉类型
 */
@RestController
@RequestMapping("/director/ComplaintType")
public class DiComplaintTypeController implements Serializable {
    @Autowired
    private DiComplaintTypeService diComplaintTypeService;
    /**
     *查询所有的投诉类型
     */
    @GetMapping("/getDiComplaintTypeList")
    public JsonResult getDiComplaintTypeList(){
        JsonResult result=new JsonResult();
        List<Map<String,Object>> list=diComplaintTypeService.getDiComplaintTypeList();
        if (list!=null){
            result.put(list);
        }else{
            result.putFailed("服务器繁忙");
        }
        return result;
    }
}
